Optimal. Leaf size=40 \[ \frac{3 \tan (a+b x)}{2 b}-\frac{\sin ^2(a+b x) \tan (a+b x)}{2 b}-\frac{3 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0387557, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {2591, 288, 321, 203} \[ \frac{3 \tan (a+b x)}{2 b}-\frac{\sin ^2(a+b x) \tan (a+b x)}{2 b}-\frac{3 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2591
Rule 288
Rule 321
Rule 203
Rubi steps
\begin{align*} \int \sin ^2(a+b x) \tan ^2(a+b x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (a+b x)\right )}{b}\\ &=-\frac{\sin ^2(a+b x) \tan (a+b x)}{2 b}+\frac{3 \operatorname{Subst}\left (\int \frac{x^2}{1+x^2} \, dx,x,\tan (a+b x)\right )}{2 b}\\ &=\frac{3 \tan (a+b x)}{2 b}-\frac{\sin ^2(a+b x) \tan (a+b x)}{2 b}-\frac{3 \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (a+b x)\right )}{2 b}\\ &=-\frac{3 x}{2}+\frac{3 \tan (a+b x)}{2 b}-\frac{\sin ^2(a+b x) \tan (a+b x)}{2 b}\\ \end{align*}
Mathematica [A] time = 0.113434, size = 31, normalized size = 0.78 \[ \frac{-6 (a+b x)+\sin (2 (a+b x))+4 \tan (a+b x)}{4 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.017, size = 54, normalized size = 1.4 \begin{align*}{\frac{1}{b} \left ({\frac{ \left ( \sin \left ( bx+a \right ) \right ) ^{5}}{\cos \left ( bx+a \right ) }}+ \left ( \left ( \sin \left ( bx+a \right ) \right ) ^{3}+{\frac{3\,\sin \left ( bx+a \right ) }{2}} \right ) \cos \left ( bx+a \right ) -{\frac{3\,bx}{2}}-{\frac{3\,a}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48577, size = 55, normalized size = 1.38 \begin{align*} -\frac{3 \, b x + 3 \, a - \frac{\tan \left (b x + a\right )}{\tan \left (b x + a\right )^{2} + 1} - 2 \, \tan \left (b x + a\right )}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60722, size = 108, normalized size = 2.7 \begin{align*} -\frac{3 \, b x \cos \left (b x + a\right ) -{\left (\cos \left (b x + a\right )^{2} + 2\right )} \sin \left (b x + a\right )}{2 \, b \cos \left (b x + a\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23741, size = 55, normalized size = 1.38 \begin{align*} -\frac{3 \, b x + 3 \, a - \frac{\tan \left (b x + a\right )}{\tan \left (b x + a\right )^{2} + 1} - 2 \, \tan \left (b x + a\right )}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]